<template>
  <div class="about">
    <h1>This is an about page</h1>
    <van-button size="large"
                type="primary"
                loading>你好</van-button>
    <van-button size="small"
                type="warning"
                plain>警告</van-button>
    <van-button type="danger"
                size="mini"
                round>警告</van-button>
    <van-button @click="say()"
                block
                icon="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png"
                color="#ff00ff">颜色</van-button>
    <van-button type="primary">
      <!-- 默认插槽 -->
      <template>
        <div>
          <button>你好</button>
          <button>222</button>
        </div>
      </template>
      <template #icon>
        <div>
          <img style="width:60px;heigth:60px;"
               src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png">
          <img style="width:60px;heigth:60px;"
               src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png">
        </div>
      </template>
    </van-button>
    <h1>about数字:{{$store.state.num}}</h1>
    <h1>getters:{{$store.getters.douNum}}</h1>
    <h1>分模块:{{$store.state.CartStore.cartnum}}</h1>
    <button @click="$store.commit('changenum',10)">触发mutations加10</button>
    <van-cell title="单元格"
              is-link />
    <van-cell title="单元格"
              is-link
              value="内容" />
    <van-cell title="单元格"
              is-link
              arrow-direction="down"
              value="内容" />

  </div>
</template>
<script>
import { getList } from '../api/home'
export default {
  created () {
    getList(1, 10).then(res => {
      console.log(res)
    })
  },
  data () {
    return {
      kk: "sdf"
    }
  },
  methods: {
    // async getHomeList () {
    //   var res1 = await getList(1, 10);
    // },
    say () {
      alert(1)
    }
  }
}
</script>
<style lang="less">
</style>
